using EasyXaf.LowCode.WorkflowEditors.Models.Activities;
using Microsoft.AspNetCore.Components;

namespace EasyXaf.LowCode.WorkflowEditors.Nodes;

public partial class BranchEndNode
{
    private bool IsEarlyEnd
    {
        get
        {
            var index = Branch.Activities.IndexOf(EndActivity);
            return Branch.Activities[index - 1] is IEndActivity;
        }
    }

    [Parameter]
    public EndActivity EndActivity { get; set; }

    [Parameter]
    public IBranch Branch { get; set; }
}